// https://api.apidoc.doyzheng.com/user/get
// https://api.apidoc.doyzheng.com/project/list
// https://api.apidoc.doyzheng.com/project/join-list
// https://api.apidoc.doyzheng.com/category/list
// https://api.apidoc.doyzheng.com/dictionary/detail
// https://api.apidoc.doyzheng.com/api/list

// yl-cli login 19137804785 li111111;

import Tesseract from 'tesseract.js';

// node-tesseract-ocr
function exec(cmds = []) {
    const path = cmds.shift();
    Tesseract.recognize(
      path,
      'eng',
      { 
        logger: m => console.log(m),
        tessedit_char_whitelist: "0123456789",
        classify_bln_numeric_mode: 1,
      }
    ).then(({ data: { text } }) => {
      console.log(text);
    })
}

export {
    exec
}
